package com.shangjinrong.controller.admin;

import com.shangjinrong.domain.LendReturn;
import com.shangjinrong.result.R;
import com.shangjinrong.service.LendReturnService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author Naruto
 */

@RestController
@CrossOrigin
@RequestMapping("admin/lendReturn")
public class AdminLendReturnController {

    @Autowired
    private LendReturnService lendReturnService;

    @GetMapping("getLendReturnByLendId/{id}")
    public R getLendReturnByLendId(@PathVariable Long id) {
        List<LendReturn> lendReturnList = lendReturnService.getByLendId(id);

        return R.ok().data("lendReturnList", lendReturnList);
    }
}
